//
//  AboutUsViewController.m
//  SimpleNote
//
//  Created by 于洪东 on 2017/11/29.
//  Copyright © 2017年 上海LOL信息技术服务有限公司. All rights reserved.
//

#import "AboutUsViewController.h"
#import <YYTextView.h>

@interface AboutUsViewController ()

@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title = NSLocalizedString(@"About us",nil);
    [self setupUI];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)setupUI{
    YYTextView *textView = [[YYTextView alloc]init];
    [self.view addSubview:textView];
    [textView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(NavigationBarHeight +10);
        make.right.equalTo(self.view).offset(-10);
        make.bottom.equalTo(self.view);
        make.left.equalTo(self.view).offset(10);
    }];
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:NSLocalizedString(@"We're doing something cool to no friends \n Making the account easier \n So that everyone can learn to keep a simple account \n Direct to the customer value or the beginning of the heart \n Save time and save money \n We love the culture of Engineers \n Yearning for a healthy life in Silicon Valley \n Pursuit of the extreme meaning of freedom \n We believe \n Dreams are in youth",nil)];
    
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
    paragraphStyle.firstLineHeadIndent = 20.0;
    paragraphStyle.paragraphSpacing = 10.0;
    paragraphStyle.lineSpacing = 3.0;
    
    
    NSDictionary *subStrAttribute = @{NSParagraphStyleAttributeName: paragraphStyle};
    [attributedString setAttributes:subStrAttribute range:NSMakeRange(0, attributedString.length)];
    
    textView.attributedText = attributedString;
    
    textView.font = [UIFont systemFontOfSize:16];
    
    textView.editable =  NO;
    
}


@end
